# decryptui.py

from PyQt5 import QtCore, QtGui, QtWidgets

class Ui_Dialog(object):
    def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(750, 650)

        self.main_layout = QtWidgets.QVBoxLayout(Dialog)
        self.main_layout.setContentsMargins(20, 20, 20, 20)
        self.main_layout.setSpacing(15)
        self.main_layout.setObjectName("main_layout")

        self.title_bar_layout = QtWidgets.QHBoxLayout()
        self.title_label = QtWidgets.QLabel(Dialog)
        self.title_label.setObjectName("TitleLabel")
        self.title_bar_layout.addWidget(self.title_label)
        self.title_bar_layout.addStretch()
        self.btn_help = QtWidgets.QPushButton(Dialog)
        self.title_bar_layout.addWidget(self.btn_help)
        self.main_layout.addLayout(self.title_bar_layout)

        self.subtitle_label = QtWidgets.QLabel(Dialog)
        self.subtitle_label.setObjectName("SubtitleLabel")
        self.main_layout.addWidget(self.subtitle_label)

        self.card_widget = QtWidgets.QWidget(Dialog)
        self.card_widget.setObjectName("Card")
        self.main_layout.addWidget(self.card_widget)

        self.form_layout = QtWidgets.QGridLayout(self.card_widget)
        self.form_layout.setVerticalSpacing(25)
        self.form_layout.setHorizontalSpacing(15)

        self.label_pid_title = QtWidgets.QLabel("PID", self.card_widget)
        self.label_pid_title.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
        self.label_pid = QtWidgets.QLabel(self.card_widget)
        self.label_pid.setObjectName("ResultLabel")
        self.form_layout.addWidget(self.label_pid_title, 0, 0)
        self.form_layout.addWidget(self.label_pid, 0, 1)

        self.label_version_title = QtWidgets.QLabel("版本", self.card_widget)
        self.label_version_title.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
        self.label_version = QtWidgets.QLabel(self.card_widget)
        self.label_version.setObjectName("ResultLabel")
        self.form_layout.addWidget(self.label_version_title, 1, 0)
        self.form_layout.addWidget(self.label_version, 1, 1)

        self.btn_getinfo = QtWidgets.QPushButton(self.card_widget)
        # --- 【关键修改 1】: 将控件名称改回原来的'checkBox' ---
        self.checkBox = QtWidgets.QCheckBox(self.card_widget)
        self.checkBox.setCheckable(False)
        self.form_layout.addWidget(self.btn_getinfo, 1, 2)
        self.form_layout.addWidget(self.checkBox, 1, 3)

        self.label_phone_title = QtWidgets.QLabel("手机号", self.card_widget)
        self.label_phone_title.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
        self.lineEdit_phone = QtWidgets.QLineEdit(self.card_widget)
        self.form_layout.addWidget(self.label_phone_title, 2, 0)
        self.form_layout.addWidget(self.lineEdit_phone, 2, 1, 1, 3)

        self.label_name_title = QtWidgets.QLabel("微信昵称", self.card_widget)
        self.label_name_title.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
        self.lineEdit_name = QtWidgets.QLineEdit(self.card_widget)
        self.form_layout.addWidget(self.label_name_title, 3, 0)
        self.form_layout.addWidget(self.lineEdit_name, 3, 1, 1, 3)

        self.label_wxid_title = QtWidgets.QLabel("wxid", self.card_widget)
        self.label_wxid_title.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
        self.label_wxid = QtWidgets.QLabel(self.card_widget)
        self.label_wxid.setObjectName("ResultLabel")
        self.form_layout.addWidget(self.label_wxid_title, 4, 0)
        self.form_layout.addWidget(self.label_wxid, 4, 1, 1, 3)

        self.label_key_title = QtWidgets.QLabel("密钥", self.card_widget)
        self.label_key_title.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
        self.label_key = QtWidgets.QLabel(self.card_widget)
        self.label_key.setObjectName("ResultLabel")
        self.label_key.setWordWrap(True)
        self.form_layout.addWidget(self.label_key_title, 5, 0)
        self.form_layout.addWidget(self.label_key, 5, 1, 1, 3)

        self.label_db_dir_title = QtWidgets.QLabel("微信路径", self.card_widget)
        self.label_db_dir_title.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
        self.label_db_dir = QtWidgets.QLabel(self.card_widget)
        self.label_db_dir.setObjectName("ResultLabel")
        self.label_db_dir.setWordWrap(True)
        self.btn_db_dir = QtWidgets.QPushButton(self.card_widget)
        # --- 【关键修改 2】: 将控件名称改回原来的'checkBox_2' ---
        self.checkBox_2 = QtWidgets.QCheckBox(self.card_widget)
        self.checkBox_2.setCheckable(False)
        self.form_layout.addWidget(self.label_db_dir_title, 6, 0)
        self.form_layout.addWidget(self.label_db_dir, 6, 1)
        self.form_layout.addWidget(self.btn_db_dir, 6, 2)
        self.form_layout.addWidget(self.checkBox_2, 6, 3)

        self.form_layout.setColumnStretch(1, 1)
        self.form_layout.setColumnMinimumWidth(0, 80)

        self.bottom_layout = QtWidgets.QHBoxLayout()
        self.bottom_layout.addStretch()
        self.btn_start = QtWidgets.QPushButton(Dialog)
        self.btn_start.setObjectName("PrimaryButton")
        self.btn_start.setMinimumSize(QtCore.QSize(150, 40))
        self.bottom_layout.addWidget(self.btn_start)
        self.bottom_layout.addStretch()
        self.main_layout.addLayout(self.bottom_layout)

        self.status_layout = QtWidgets.QHBoxLayout()
        self.label_ready = QtWidgets.QLabel(Dialog)
        self.progressBar = QtWidgets.QProgressBar(Dialog)
        self.status_layout.addWidget(self.label_ready)
        self.status_layout.addWidget(self.progressBar, 1)
        self.main_layout.addLayout(self.status_layout)
        
        self.main_layout.addStretch()

        self.retranslateUi(Dialog)
        QtCore.QMetaObject.connectSlotsByName(Dialog)

    def retranslateUi(self, Dialog):
        _translate = QtCore.QCoreApplication.translate
        Dialog.setWindowTitle(_translate("Dialog", "解密工具"))
        self.title_label.setText(_translate("Dialog", "解密数据库"))
        self.subtitle_label.setText(_translate("Dialog", "以下内容为自动获取，如获取失败请手动填写或设置。"))
        self.btn_help.setText(_translate("Dialog", "使用说明"))
        self.btn_getinfo.setText(_translate("Dialog", "获取信息"))
        self.lineEdit_phone.setPlaceholderText(_translate("Dialog", "请填写微信绑定的手机号"))
        self.lineEdit_name.setPlaceholderText(_translate("Dialog", "请填写您的微信昵称"))
        self.btn_db_dir.setText(_translate("Dialog", "设置路径"))
        self.btn_start.setText(_translate("Dialog", "开始启动"))
        self.label_ready.setText(_translate("Dialog", "未就绪"))